home *** CD-ROM | disk | FTP | other *** search
- /* Copyright, 1990, Regents of the University of Colorado */
- /* This program prints out messages from two composite procedures, inside of a
- * single one dimensional environment structure. */
-
- #define P 14
-
- environment node[P:id] { /* ==> The size of an environment structure
- does not have to be a power of two */
-
- composite part1()
-
- {
- printf ("node[%d] says hello from part1()#\n", id);
- }
-
- composite part2() /* ==> Multiple composite procedures may be
- declared within the same environment
- structure. However, only one of these
- may be active at any one time. */
-
- {
- printf ("node[%d] says hello from part2()#\n", id);
- }
-
- }
-
- environment host {
-
- void main ()
-
- {
- printf ("host says hello\n");
-
- part1()#;
- part2()#; /* ==> Part1()# must finish execution before
- Part2()# begins. */
-
- printf ("host says goodbye\n");
- }
-
- }
-